
module.exports = function ($http,$q, $cookies, httpservice) {
    var feedbackService = {};

    // 意见反馈
    feedbackService.feedback = function (content) {

        /*登录用户ID*/
        var userId = kbt.decrypt($cookies.get('cookieUserId'));

        var  params ={"biglawuserid":userId,"content":content};

        var deferred = $q.defer();
        $http({
            method: 'POST',
            url: httpservice.saveFeedbackUrl,
            data:params,
            headers : {'Content-Type':'application/json'}
        }).then(function successCallback(response) {
            deferred.resolve(response.data);
        }, function errorCallback(response) {
            deferred.reject(response);
        });
        return deferred.promise;
    };

    return feedbackService;
};
